package engine;

/**
 * Classe modélisant un tweet du corpus par les données suivantes : polarité,
 * marque et vecteur Tf.Idf
 */
public class Tweet {

    public static enum Polarity {

        positive, negative, neutral, irrelevant, unknown
    }

    public static enum Brand {

        apple, twitter, google, microsoft, unknown
    }
    private AbstractVectorTI vector;
    private Polarity polarity;
    private Brand brand;
    private String contenu;

    public Tweet() {
        this.brand = null;
        this.polarity = null;
        this.vector = null;
        this.contenu = null;
    }

    public Tweet(Tweet t) {
        this();

        if (t != null) {
            this.brand = t.getBrand();
            this.polarity = t.getPolarity();
            this.vector = (t.getVector() == null) ? null : t.getVector().clone();
        }
    }

    public AbstractVectorTI getVector() {
        return vector;
    }

    public void setVector(AbstractVectorTI vector) {
        this.vector = vector;
    }

    public Polarity getPolarity() {
        return polarity;
    }

    public void setPolarity(Polarity polarity) {
        this.polarity = polarity;
    }

    public Brand getBrand() {
        return brand;
    }

    public void setBrand(Brand brand) {
        this.brand = brand;
    }

    public String getContenu() {
        return contenu;
    }

    public void setContenu(String s) {
        this.contenu = s;
    }

    @Override
    public String toString() {
        return brand + ", " + polarity;
    }
}
